package main

import (
	_ "yjk/routers"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	// _ "github.com/lib/pq"
)

func init() {
	// orm.RegisterDataBase("default", "postgres", "postgres://ilive:ilive@192.168.1.128:5432/ilive?sslmode=disable")
	//	beego.SetLevel(beego.LevelInformational)
	if beego.BConfig.RunMode == "dev" {
		beego.SetLevel(beego.LevelDebug)
		orm.Debug = true
	}
}

func main() {
	// if beego.BConfig.RunMode == "dev" {
	// 	beego.BConfig.WebConfig.DirectoryIndex = true
	// 	beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	// }

	beego.Run()
}
